Chip cards frequently have a data memory which, for example, is organized in the form of a hierarchical file system and which is provided, in particular, in the form of an EEPROM memory module. In addition, the data memory of chip cards serves, in particular, also as a memory for programs which can be reloaded as a function of the application. The reloading of programs after the chip card has been manufactured, and in particular after it has been personalized or initialized permits subsequent reloading of, in particular, program routines or files, such as for example encryption algorithms, which only the application provider of the chip card, and not the manufacturer of the chip card, knows. Programs for fault recovery or expansion routines, in particular for the operating system of the chip card, can also be reloaded subsequently. For example, the need to carry out costly reengineering of a ROM memory module with a faulty chip card operating system can thus be dispensed with because program routines for fault correction can be reloaded. For example, application and user programs can also be reloaded as a function of the application.
In the case of chip cards, there exits the problem here that only command instructions with absolute address parameters are available for the programs which are as a rule created at the chip card programming code level, in particular at the machine command level. These are command instructions with an absolute memory address system in which the access address in the memory of the chip card is specified directly and which is independent of the memory address of the corresponding command instruction itself. In the chip card, the command instructions which are generally used in PC systems and which have a relative memory addressing system are not at all available, or available only to a very restricted extent, with the result that in the case of programs for chip cards it is necessary to resort to accessing command instructions with an absolute memory addressing system. Such command instructions in the case of chip cards with absolute address parameters are, in particular, jump instructions, shift instructions or address instructions, for example the so-called xe2x80x98MOV_DPTRxe2x80x99, xe2x80x98#adrsxe2x80x99, xe2x80x98LCALL_adrsxe2x80x99 or xe2x80x98LJMP_adrsxe2x80x99 command instructions.
When a reloadable program is created with command instructions with absolute address parameters for a chip card it is therefore necessary for the memory area which is provided to be known, in particular for the start address, at which the program is to be reloaded, to be known.
If the program is to be stored at a different location in the memory, it is necessary to adapt specific command instructions with absolute address parameters. There are, in particular, two groups of command instructions with absolute address parameters available for this. A first group of these command instructions is independent of the memory area which the program in the memory occupies, in particular because the address parameters refer to memory areas which are not occupied by the reloadable program, for example to the operating system of the chip card. On the other hand, a second group of these command instructions is dependent on the memory area which the program occupies in the memory, in particular because the address parameters refer to the memory area which is occupied by the reloadable program. If the program is shifted, the address parameters of the second group of command instructions are adapted, while the address parameters of the first group of command instructions must remain unchanged.
A problem is that command instructions with absolute address parameters of the memory area of the reloadable program in the memory can be either independent or dependent. The distinction for command instructions with absolute address parameters between the first and
Second group is not dependent on the type of the respective command instruction here. The disadvantageous possibility is known that, during the actual creation of a reloadable program for chip cards, a specific version of the corresponding reloadable program, which takes into account its respective application-dependent arrangement in the memory of the chip card, is created for any foreseeable application which can be provided.
It is particularly disadvantageous that such an adaptation of the program to its application-dependent memory area assignment in the memory of the chip card can, generally, not be performed in particular by the user himself because the user frequently does not know the structure of the reloadable program, or is also not supposed to know it at all. In particular, it is necessary for complicated revision of the program to be performed xe2x80x9cmanuallyxe2x80x9d or with specific compilers or interpreters by the manufacturer of the reloadable program.
An object of the present invention is to provide a chip card with programs which can be reloaded as a function of the application and which permits a more advantageous adaptation of the respective program to its application-dependent memory area assignment in the memory of the chip card.
An advantage of the chip card according to the preset invention is that during the creation of a reloadable program which has command instructions with absolute address parameters, it is only necessary to create a single program version. This basic version of the program can then be reloaded into the memory of the chip card as a function of the application, and in particular can be installed or configured by means of the chip card itself, i.e., can be adapted to the memory area which is occupied as a function of the application.
It is particularly advantageous that the memory area which is occupied by the reloadable program can, according to the invention, preset have at least a first memory element and a second memory element for separating at least the command instructions with absolute address parameters, which refer to the memory area occupied by the program, and the memory areas which are not occupied by the program. Thus, the necessary adaptation of the reloadable program to the memory area occupied by it, i.e., the necessary adaptation of the program in particular to its application-dependent start address, can advantageously be carried out completely by the program execution unit of the chip card. To reload a program, a user of the chip card thus advantageously requires no detailed knowledge of the program structure, with the result that, in particular, it is possible to reload even programs which relate to the security of the chip card and whose internal structures are not supposed to be known to the user.